package com.orange.handler.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orange.dbhelp.page.Page;
import com.orange.handler.AuthExportGroupMapService;
import com.orange.modules.dao.AuthExportGroupMapRepository;
import com.orange.modules.dao.AuthSchoolGroupMapRepository;
import com.orange.modules.entity.expert.AuthExportGroupMap;
import com.orange.modules.entity.expert.AuthGroup;
import com.orange.modules.entity.school.AuthSchoolGroupMap;

@Service
public class AuthExportGroupMapServiceImpl implements AuthExportGroupMapService{

	
	@Autowired
	private AuthExportGroupMapRepository authExportGroupMapRepository;

	@Autowired
	private AuthSchoolGroupMapRepository authSchoolGroupMapRepository;
	
	
	@Override
	public AuthExportGroupMap queryAuthExportGroupMapById(String pid)
			throws SQLException {
		AuthExportGroupMap a = authExportGroupMapRepository.queryAuthExportGroupMapById(pid);
		return a;
	}

	@Override
	public void saveAuthExportGroupMap(AuthExportGroupMap a)throws SQLException {
		authExportGroupMapRepository.saveAuthExportGroupMap(a);
		
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#addAuthExportGroupMapList(java.util.List)
	 */
	@Override
	public void addAuthExportGroupMapList(List<AuthExportGroupMap> list) {
		authExportGroupMapRepository.addAuthExportGroupMapList(list);
		
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#queryAuthExportGroupMapByExpertId(java.lang.String)
	 */
	@Override
	public List<AuthExportGroupMap> queryAuthExportGroupMapByGroupId(
			String groupId) throws SQLException {
		List<AuthExportGroupMap> ls=authExportGroupMapRepository.queryAuthExportGroupMapByGroupId(groupId);
		return ls;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#queryEduCollectionsPage(java.util.Map)
	 */
	@Override
	public Page<AuthExportGroupMap> queryAuthExportGroupMapPage(
			Map<String, String> map) throws SQLException {
		Page<AuthExportGroupMap> ls=authExportGroupMapRepository.queryAuthExportGroupMapPage(map);
		return ls;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#queryAuthExportGroupMapByIdentity(java.lang.String, java.lang.String)
	 */
	@Override
	public AuthExportGroupMap queryAuthExportGroupMapByIdentity(String groupId,
			String identity) throws SQLException {
		AuthExportGroupMap aa=authExportGroupMapRepository.queryAuthExportGroupMapByIdentity(groupId, identity);
		return aa;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#deleteAuthExportGroupMapById(java.lang.String)
	 */
	@Override
	public void deleteAuthExportGroupMapById(String pid) {
		authExportGroupMapRepository.deleteAuthExportGroupMapById(pid);
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#queryAuthExportGroupMapByExpertId(java.lang.String)
	 */
	@Override
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId(String expertId)
			throws SQLException {
		AuthExportGroupMap a=authExportGroupMapRepository.queryAuthExportGroupMapByExpertId(expertId);
		return a;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#queryAuthExportGroupMapByExpertId1(java.lang.String)
	 */
	@Override
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId1(String expertId)
			throws SQLException {
		AuthExportGroupMap a=authExportGroupMapRepository.queryAuthExportGroupMapByExpertId1(expertId);
		return a;
	}

	@Override
	public Page<AuthGroup> queryAuthGroupInfoByPage(Map<String, String> map)
			throws SQLException {
		Page<AuthGroup> ag = authExportGroupMapRepository.queryAuthGroupInfoByPage(map);
		return ag;
	}

	/* (non-Javadoc)
	 * @see com.orange.handler.AuthExportGroupMapService#queryAuthExportGroupMapByExpertId_material(java.lang.String)
	 */
	@Override
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId_material(
			String expertId) throws SQLException {
		AuthExportGroupMap a=authExportGroupMapRepository.queryAuthExportGroupMapByExpertId_material(expertId);
		return a;
	}

	@Override
	public List<AuthGroup> queryGroupIdByState(String state)
			throws SQLException {
		List<AuthGroup> list = authExportGroupMapRepository.queryGroupIdByState(state);
		return list;
	}

	@Override
	public List<AuthExportGroupMap> queryExpertIdByGroupId(String groupId)
			throws SQLException {
		List<AuthExportGroupMap> list = authExportGroupMapRepository.queryExpertIdByGroupId(groupId);
		return list;
	}

	@Override
	public AuthExportGroupMap queryAuthExportGroupMapByExpertId2(String state, String expertId)
			throws SQLException {
		AuthExportGroupMap a=authExportGroupMapRepository.queryAuthExportGroupMapByExpertId(expertId);
		return a;
	}

	@Override
	public AuthExportGroupMap queryGroupId(String expertId) throws SQLException {
		AuthExportGroupMap aeg = authExportGroupMapRepository.queryGroupId(expertId);
		return aeg;
	}

	@Override
	public void deleteAuthSchoolGroupMap(String schoolId, String groupId)
			throws SQLException {
		authExportGroupMapRepository.deleteAuthSchoolGroupMap(schoolId, groupId);
		
	}

	@Override
	public void saveAuthSchoolGroupMap(AuthSchoolGroupMap as) {
		authSchoolGroupMapRepository.saveAuthSchoolGroupMap(as);
	}

	@Override
	public AuthExportGroupMap querygroupIdByExpertId(String expertId)
			throws SQLException {
		AuthExportGroupMap eg = authExportGroupMapRepository.querygroupIdByExpertId(expertId);
		return eg;
	}

}
